<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>将字符由一种 Cyrillic 字符转换成另一种</title>
 </head>
 <body class="docs"><div id="layout">
  <div id="layout-content"><div id="function.convert-cyr-string" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">convert_cyr_string</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">convert_cyr_string</span> &mdash; <span class="dc-title">将字符由一种 Cyrillic 字符转换成另一种</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.convert-cyr-string-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>convert_cyr_string</strong></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$str</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$from</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$to</code></span>
   ) : <span class="type">string</span></div>

  <p class="para rdfs-comment">
   此函数将给定的字符串从一种
   Cyrillic 字符转换成另一种，返回转换之后的字符串。
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.convert-cyr-string-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<code class="parameter">str</code></dt>

     <dd>

      <p class="para">
       要转换的字符。
      </p>
     </dd>

    
    
     <dt>
<code class="parameter">from</code></dt>

     <dd>

      <p class="para">
       单个字符，代表源 Cyrillic 字符集。
      </p>
     </dd>

    
    
     <dt>
<code class="parameter">to</code></dt>

     <dd>

      <p class="para">
       单个字符，代表了目标 Cyrillic 字符集。
      </p>
     </dd>

    
   </dl>

  </p>
  <p class="para">
   支持的类型有：
   <ul class="itemizedlist">
    <li class="listitem">
     <span class="simpara">
      k - koi8-r
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      w - windows-1251
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      i - iso8859-5
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      a - x-cp866
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      d - x-cp866
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      m - x-mac-cyrillic
     </span>
    </li>
   </ul>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.convert-cyr-string-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   返回转换后的字符串。
  </p>
 </div>


 <div class="refsect1 notes" id="refsect1-function.convert-cyr-string-notes">
  <h3 class="title">注释</h3>
  <blockquote class="note"><p><strong class="note">Note</strong>: <span class="simpara">此函数可安全用于二进制对象。</span></p></blockquote>
 </div>

</div></div></div></body></html>